package com.youku.plugins.controlbarV4.view.components
{
   import flash.display.Sprite;
   import com.youku.baseUI.BasePlayerButton;
   import flash.display.DisplayObject;
   import flash.text.TextFormat;
   import com.youku.utils.AssetUtil;
   import com.youku.plugins.controlbarV4.ControlBarFont;
   
   public class CommonTextButton extends Sprite
   {
      
      public function CommonTextButton() {
         super();
         this._btn = AssetUtil.getStyleButton("C_Text_btn_bg");
         AssetUtil.restoreButtonSize(this._btn);
         this._btn.setStyle("textFormat",ControlBarFont.FONT_QUALITY_UP);
         this._btn.setStyle("disabledTextFormat",ControlBarFont.FONT_QUALITY_DISABLE);
         this._btn.setStyle("textPadding",-3);
         this._btn.hardOffset = -2;
         this._btn.validateNow();
         addChild(this._btn);
      }
      
      protected var _btn:BasePlayerButton;
      
      public function set label(param1:String) : void {
         this._btn.label = param1;
      }
      
      public function set enabled(param1:Boolean) : void {
         this._btn.enabled = param1;
         this.mouseEnabled = param1;
      }
      
      public function setStyle(param1:String, param2:DisplayObject, param3:TextFormat) : void {
         this._btn.setStyle(param1,param2);
         this._btn.setStyle("disabledTextFormat",param3);
      }
   }
}
